<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		.nav{
			width: 100%;
			height: 50px;
			background: black;
			line-height: 50px;
		}
		.first{
			color: white;
			list-style: none;
			float: left;
			padding: 0 40px;
			background: pink;
			margin: 0 20px;
			position: relative;
		}
		.erji li{
			list-style: none;
		}
		.erji{
			text-align: center;
			width: 100%;
			background: pink;
			position: absolute;
			bottom: -150px;
			left: 0;
			visibility: hidden;	
		}
		.first:hover .erji{
			visibility: visible;
		}
		.shop{
			color: white;
			list-style: none;
			float: right;
			padding: 0 40px;
			background: gray;
			margin: 0 20px;
			position: relative;
		}
		.shop1{
			color: black;
			text-align: center;
			width: 300px;
			height: 0px;
			border: 1px solid black;
			background: white;
			position: absolute;
			right: 0;
			top: 50px;
/*			visibility: hidden;*/
			/*	设置过度时间 ; all:表示所有hover属性都参与进来
					0.3表示过度时间	*/
			transition: all 0.3s;
			/*	溢出隐藏		*/
			overflow: hidden;
		}
		.shop:hover .shop1{
/*			visibility: visible;*/
			height: 100px;
		}
	</style>
</head>
<body>
	<div class="nav">
		<ul>
			<li class="first">首页
				<div class="erji">
					<ul>
						<li>二级导航</li>
						<li>二级导航</li>
						<li>二级导航</li>
					</ul>
				</div>
			</li>
			<li class="first">首页</li>
			<li class="first">首页</li>
			<li class="shop">购物车(0)
				<div class="shop1">
					<p>快来购物吧</p>
				</div>
			</li>
		</ul>
	</div>
</body>
</html>